package cn.growthgate.fgo.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;

import cn.growthgate.fgo.entity.enums.ColorCard;
import cn.growthgate.fgo.entity.enums.PanelLevel;
import cn.growthgate.fgo.entity.enums.ServantCards;
import cn.growthgate.fgo.entity.enums.ServantFaction;
import cn.growthgate.fgo.entity.enums.ServantGet;
import cn.growthgate.fgo.entity.enums.ServantNpType;
import cn.growthgate.fgo.entity.enums.ServantPropA;
import cn.growthgate.fgo.entity.enums.ServantPropB;
import cn.growthgate.fgo.entity.enums.Sex;
import cn.growthgate.fgo.util.StringUtils;

/**
 * <p>
 * 从者
 * </p>
 *
 * @author GrowthGate
 * @since 2019-05-20
 */
@TableName("t_data_servant")
public class Servant extends Model<Servant> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 游戏id
	 */
	private Integer gameId;

	/**
	 * 姓名
	 */
	private String name;

	/**
	 * 日文名
	 */
	private String jName;

	/**
	 * 英文名
	 */
	private String eName;

	/**
	 * 昵称
	 */
	private String nickname;

	/**
	 * 星级
	 */
	private Integer star;

	/**
	 * cost
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer cost;

	/**
	 * 职介id
	 */
	private Long classId;

	/**
	 * 阵营
	 */
	private ServantFaction faction;

	/**
	 * 获取方式
	 */
	private String get;

	/**
	 * 初始hp
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer initialHp;

	/**
	 * 初始atk
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer initialAtk;

	/**
	 * 满级hp
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer fullLevelHp;

	/**
	 * 满级atk
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer fullLevelAtk;

	/**
	 * 百级hp
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer hundredHp;

	/**
	 * 百级atk
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private Integer hundredAtk;

	/**
	 * 头像
	 */
	private String avatar;

	/**
	 * 宝具色卡
	 */
	private ColorCard npColorCard;

	/**
	 * 宝具类型
	 */
	private ServantNpType npType;

	/**
	 * 指令卡
	 */
	private ServantCards cards;

	/**
	 * 性别
	 */
	private Sex sex;

	/**
	 * 属性A
	 */
	private ServantPropA propA;

	/**
	 * 属性B
	 */
	private ServantPropB propB;

	/**
	 * 画师id
	 */
	private Long painterId;

	/**
	 * 身高
	 */
	private String height;

	/**
	 * 体重
	 */
	private String weight;

	/**
	 * 筋力
	 */
	private PanelLevel strength;

	/**
	 * 耐久
	 */
	private PanelLevel endurance;

	/**
	 * 敏捷
	 */
	private PanelLevel agility;

	/**
	 * 魔力
	 */
	private PanelLevel mana;

	/**
	 * 幸运
	 */
	private PanelLevel luck;

	/**
	 * 宝具
	 */
	private PanelLevel npLevel;

	/**
	 * Q卡np率
	 */
	private BigDecimal npQuick;

	/**
	 * A卡np率
	 */
	private BigDecimal npArts;

	/**
	 * B卡np率
	 */
	private BigDecimal npBuster;

	/**
	 * Ex卡np率
	 */
	private BigDecimal npExtra;

	/**
	 * 宝具卡np率
	 */
	private BigDecimal npNp;

	/**
	 * 受击np
	 */
	private Integer npSuffer;

	/**
	 * Q卡hit
	 */
	private Integer hitQuick;

	/**
	 * A卡hit
	 */
	private Integer hitArts;

	/**
	 * B卡hit
	 */
	private Integer hitBuster;

	/**
	 * Ex卡hit
	 */
	private Integer hitExtra;

	/**
	 * 宝具卡hit
	 */
	private Integer hitNp;

	/**
	 * 出星率
	 */
	private BigDecimal starRate;

	/**
	 * 即死补正
	 */
	private BigDecimal beKilled;

	/**
	 * 集星权重
	 */
	private Integer collectingStars;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getGameId() {
		return gameId;
	}

	public void setGameId(Integer gameId) {
		this.gameId = gameId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getjName() {
		return jName;
	}

	public void setjName(String jName) {
		this.jName = jName;
	}

	public String geteName() {
		return eName;
	}

	public void seteName(String eName) {
		this.eName = eName;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public Integer getStar() {
		return star;
	}

	public void setStar(Integer star) {
		this.star = star;
	}

	public Integer getCost() {
		return cost;
	}

	public void setCost(Integer cost) {
		this.cost = cost;
	}

	public Long getClassId() {
		return classId;
	}

	public void setClassId(Long classId) {
		this.classId = classId;
	}

	public ServantFaction getFaction() {
		return faction;
	}

	public void setFaction(ServantFaction faction) {
		this.faction = faction;
	}

	public String getGet() {
		return get;
	}

	public void setGet(String get) {
		this.get = get;
	}

	public Integer getInitialHp() {
		return initialHp;
	}

	public void setInitialHp(Integer initialHp) {
		this.initialHp = initialHp;
	}

	public Integer getInitialAtk() {
		return initialAtk;
	}

	public void setInitialAtk(Integer initialAtk) {
		this.initialAtk = initialAtk;
	}

	public Integer getFullLevelHp() {
		return fullLevelHp;
	}

	public void setFullLevelHp(Integer fullLevelHp) {
		this.fullLevelHp = fullLevelHp;
	}

	public Integer getFullLevelAtk() {
		return fullLevelAtk;
	}

	public void setFullLevelAtk(Integer fullLevelAtk) {
		this.fullLevelAtk = fullLevelAtk;
	}

	public Integer getHundredHp() {
		return hundredHp;
	}

	public void setHundredHp(Integer hundredHp) {
		this.hundredHp = hundredHp;
	}

	public Integer getHundredAtk() {
		return hundredAtk;
	}

	public void setHundredAtk(Integer hundredAtk) {
		this.hundredAtk = hundredAtk;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public ColorCard getNpColorCard() {
		return npColorCard;
	}

	public void setNpColorCard(ColorCard npColorCard) {
		this.npColorCard = npColorCard;
	}

	public ServantNpType getNpType() {
		return npType;
	}

	public void setNpType(ServantNpType npType) {
		this.npType = npType;
	}

	public ServantCards getCards() {
		return cards;
	}

	public void setCards(ServantCards cards) {
		this.cards = cards;
	}

	public Sex getSex() {
		return sex;
	}

	public void setSex(Sex sex) {
		this.sex = sex;
	}

	public ServantPropA getPropA() {
		return propA;
	}

	public void setPropA(ServantPropA propA) {
		this.propA = propA;
	}

	public ServantPropB getPropB() {
		return propB;
	}

	public void setPropB(ServantPropB propB) {
		this.propB = propB;
	}

	public Long getPainterId() {
		return painterId;
	}

	public void setPainterId(Long painterId) {
		this.painterId = painterId;
	}

	public String getHeight() {
		return height;
	}

	public void setHeight(String height) {
		this.height = height;
	}

	public String getWeight() {
		return weight;
	}

	public void setWeight(String weight) {
		this.weight = weight;
	}

	public PanelLevel getStrength() {
		return strength;
	}

	public void setStrength(PanelLevel strength) {
		this.strength = strength;
	}

	public PanelLevel getEndurance() {
		return endurance;
	}

	public void setEndurance(PanelLevel endurance) {
		this.endurance = endurance;
	}

	public PanelLevel getAgility() {
		return agility;
	}

	public void setAgility(PanelLevel agility) {
		this.agility = agility;
	}

	public PanelLevel getMana() {
		return mana;
	}

	public void setMana(PanelLevel mana) {
		this.mana = mana;
	}

	public PanelLevel getLuck() {
		return luck;
	}

	public void setLuck(PanelLevel luck) {
		this.luck = luck;
	}

	public PanelLevel getNpLevel() {
		return npLevel;
	}

	public void setNpLevel(PanelLevel npLevel) {
		this.npLevel = npLevel;
	}

	public BigDecimal getNpQuick() {
		return npQuick;
	}

	public void setNpQuick(BigDecimal npQuick) {
		this.npQuick = npQuick;
	}

	public BigDecimal getNpArts() {
		return npArts;
	}

	public void setNpArts(BigDecimal npArts) {
		this.npArts = npArts;
	}

	public BigDecimal getNpBuster() {
		return npBuster;
	}

	public void setNpBuster(BigDecimal npBuster) {
		this.npBuster = npBuster;
	}

	public BigDecimal getNpExtra() {
		return npExtra;
	}

	public void setNpExtra(BigDecimal npExtra) {
		this.npExtra = npExtra;
	}

	public BigDecimal getNpNp() {
		return npNp;
	}

	public void setNpNp(BigDecimal npNp) {
		this.npNp = npNp;
	}

	public Integer getNpSuffer() {
		return npSuffer;
	}

	public void setNpSuffer(Integer npSuffer) {
		this.npSuffer = npSuffer;
	}

	public Integer getHitQuick() {
		return hitQuick;
	}

	public void setHitQuick(Integer hitQuick) {
		this.hitQuick = hitQuick;
	}

	public Integer getHitArts() {
		return hitArts;
	}

	public void setHitArts(Integer hitArts) {
		this.hitArts = hitArts;
	}

	public Integer getHitBuster() {
		return hitBuster;
	}

	public void setHitBuster(Integer hitBuster) {
		this.hitBuster = hitBuster;
	}

	public Integer getHitExtra() {
		return hitExtra;
	}

	public void setHitExtra(Integer hitExtra) {
		this.hitExtra = hitExtra;
	}

	public Integer getHitNp() {
		return hitNp;
	}

	public void setHitNp(Integer hitNp) {
		this.hitNp = hitNp;
	}

	public BigDecimal getStarRate() {
		return starRate;
	}

	public void setStarRate(BigDecimal starRate) {
		this.starRate = starRate;
	}

	public BigDecimal getBeKilled() {
		return beKilled;
	}

	public void setBeKilled(BigDecimal beKilled) {
		this.beKilled = beKilled;
	}

	public Integer getCollectingStars() {
		return collectingStars;
	}

	public void setCollectingStars(Integer collectingStars) {
		this.collectingStars = collectingStars;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Servant{" + "id=" + id + ", gameId=" + gameId + ", name=" + name + ", jName=" + jName + ", eName="
				+ eName + ", nickname=" + nickname + ", star=" + star + ", cost=" + cost + ", classId=" + classId
				+ ", faction=" + faction + ", get=" + get + ", initialHp=" + initialHp + ", initialAtk=" + initialAtk
				+ ", fullLevelHp=" + fullLevelHp + ", fullLevelAtk=" + fullLevelAtk + ", hundredHp=" + hundredHp
				+ ", hundredAtk=" + hundredAtk + ", avatar=" + avatar + ", npColorCard=" + npColorCard + ", npType="
				+ npType + ", cards=" + cards + ", sex=" + sex + ", propA=" + propA + ", propB=" + propB
				+ ", painterId=" + painterId + ", height=" + height + ", weight=" + weight + ", strength=" + strength
				+ ", endurance=" + endurance + ", agility=" + agility + ", mana=" + mana + ", luck=" + luck
				+ ", npLevel=" + npLevel + ", npQuick=" + npQuick + ", npArts=" + npArts + ", npBuster=" + npBuster
				+ ", npExtra=" + npExtra + ", npNp=" + npNp + ", npSuffer=" + npSuffer + ", hitQuick=" + hitQuick
				+ ", hitArts=" + hitArts + ", hitBuster=" + hitBuster + ", hitExtra=" + hitExtra + ", hitNp=" + hitNp
				+ ", starRate=" + starRate + ", beKilled=" + beKilled + ", collectingStars=" + collectingStars + "}";
	}

	public List<ServantGet> getGets() {
		return Arrays.asList(StringUtils.splitToEnum(ServantGet.class, getGet(), ","));
	}

}
